package com.sp2.dev.util;

import java.util.Random;

/**
 * Created by IntelliJ IDEA.
 * User: zhimingli
 * Date: 14-2-18
 * Time: 上午10:24
 * 随机数工具类
 */
public class RandomUtil {
    public static final String RANDOM_NUMBER = "0123456789";
    public static final String RANDOM_STRING = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
    public static final Random RANDOM = new Random();

    public static void main(String[] args) {

    }

    public static int nextInt(Random r, int start, int end) {
        int i = end - start + 1;
        return r.nextInt(i) + start;
    }
    
}
